package td.pt.ui;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;

public class UsabilityTextQuestion extends Composite implements HasText {

	private static UsabilityTextQuestionUiBinder uiBinder = GWT
			.create(UsabilityTextQuestionUiBinder.class);

	interface UsabilityTextQuestionUiBinder extends
			UiBinder<Widget, UsabilityTextQuestion> {
	}

	public UsabilityTextQuestion() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	@UiField
	Label description;
	@UiField
	TextBox response;

	public UsabilityTextQuestion(String questionText) {
		initWidget(uiBinder.createAndBindUi(this));
		description.setText(questionText);
	}

	public void setText(String text) {
		description.setText(text);
	}

	public String getText() {
		return description.getText();
	}

	public String getValue() {
		return response.getText();
	}
}
